1. Field of Invention
The present invention relates to a network device having an apparatus for selectively configuring the network device using an Electrically Erasable Programmable Read Only Memory (EEPROM). More specifically, the network device is able to use dynamic configuration settings in the EEPROM interface, that increases flexibility, has fewer limitations and is a low cost alternative.
2. Description of Related Art
Many types of network devices are necessary to allow a network to function properly. These network devices are composed of chips, with these chips allowing for the control and monitoring of data through the network device. Chip vendors may pre-set some register default values inside a network device, such as a switch/hub chip, to provide a low cost switch and hub application. That means it is not necessary for system integrators to change the internal register default values to build a workable system. The preconfigured chips allow for the network devices to be setup and to function quickly for a majority of system integrators.
In some cases, these pre-set register default values might not suitable for some system integrators. Chip vendors should provide some methods so that system integrators can change some register values instead of using default values. Some chip vendors will provide a microprocessor interface (SPI, I2C, or PCI) to allow system integrators to change all write-able registers. However, built-in microprocessors on the chip boards increase system costs and may not be needed by many customers.
Another alternative method to allow users to change the default values is to provide an Electrically Erasable Programmable Read Only Memory (EEPROM) interface. With an EEPROM interface, a system integrator can change some register default values using a very low cost EEPROM. Most chip vendors have provided an EEPROM interface for a low cost switch and hub application.
FIG. 1 provides as an example of a low cost pre-programmed EEPROM that is used to change some default values of a network switch/hub chip. When the external control signal (RESET) goes to inactive, network switch/hub chip start to change its some register default values via downloading the contents of EEPROM. And then network switch/hub chip start its normal operation after the download phase had been finished.
When the RESET signal goes to inactive, the network switch/hub chip starts to fetch data from external EEPROM automatically. Most of the network switch/hub chips will fetch data from EEPROM address 00h (the first entry), and fetch the other data in sequence. In order to change some register default values or set chip configuration, the chip vendor will provide a register set (a part of chip register file) which are downloadable from EEPROM. Each entry of EEPROM is pre-defined and will directly map to one or more entries of a register set inside network switch/hub chip as described in FIG. 2.
However, in this kind of scenario, two major drawbacks may occur. First, different system integrators may want to change different registers. And it is not necessary for system integrators to configure all downloaded register. However, even if system integrators only want to configure some of chip downloadable registers, it is still necessary to fill all the contents of downloadable register set into EEPROM. Secondly, some register default values of network switch/hub chip are change-able via microprocessor interface, but they are not downloadable via EEPROM. In this case, the only way for system integrator to act is to build a microprocessor on the PCB instead of using a very low cost EEPROM.
Thus, there is a need for a mechanism and a process to be used with a network device that allows for a system integrator to make changes to default settings of the network device that is not costly or cumbersome. Additionally, there is also a need for such a mechanism to change only certain defaults on a network device without the limitations imposed by the prior art processes and devices. Also, there is a need for a system that can use multiple inputs to allow for changes to the default values of the network device.
It is an object of this invention to overcome the drawbacks of the above-described conventional network devices and methods. The present invention provides for a new approach for chip and network component vendors to provide system integrators a dynamic configuration using a low cost EEPROM. With this approach, system integrators will have flexibility to change the default values of all configurable registers inside a network device, such as a switch/hub chip or components on a PC board. A network device will be able to update configuration setting either through the low cost EEPROM or though a microprocessor interface.
According to one aspect of this invention, a method for configuring default values of a network device is disclosed. First, it is determined whether the default values are obtained through a microprocessor interface or a memory interface. When it is determined that the default values are obtained through the memory interface, a header is received from a memory through the memory interface it is determined from the header whether any default value of the network device should be updated. If the network device should be updated, then at least one configuration instruction is fetched from the memory and the at least one configuration instruction is interpreted. A register default value of the default values is changed, corresponding to the interpreted at least one configuration instruction. Alternatively, when it is determined that the default values are obtained through the microprocessor interface, the default values are changed according to data received through the microprocessor interface.
Additionally, the method may further include monitoring a reset signal to determine whether the default values of the network device should be updated. In addition, the memory and memory interface can be an EEPROM and an EEPROM interface. Also, the step of determining from the header whether any default value of the network device should be updated can be a step of determining from the header a number of the default values of the network device that should be updated. In that case, the number of configuration instructions fetched from the EEPROM is equal to the number of the default values of the network device that should be updated. In addition, a key value may be determined from the header and be compared with a magic number pre-defined inside network device to determine whether any default value of the network device should be updated. Also, the at least one configuration instruction can be a plurality of configuration instructions and the configuration instructions are repeatedly fetched from the EEPROM until all of the plurality of configuration instructions have been fetched.
In another aspect of the invention, a network device, having default values that are flexibly configurable, is also disclosed. The device includes a microprocessor interface, an memory interface, a register file containing the default values for the network device, and a configuration instruction interpreter. The memory interface is configured to receive configuration instructions, with each configuration instruction of the configuration instructions being composed of an address index and a corresponding value, wherein the configuration instruction interpreter is configured to interpret the received configuration instructions such that the corresponding values are mapped corresponding default values of the register file, and wherein the network device is configurable to set default values based on data received through either the microprocessor interface and the memory interface.
Also, the configuration instruction interpreter may be configured to monitor a reset signal to determine if the default values should be updated or be configured to determine from the header a number of the default values of the network device that should be updated. In addition, the memory interface can be an EEPROM interface. Additionally, the configuration instruction interpreter may be configured to fetch a number of configuration instructions from the EEPROM equal to the number of the default values of the network device that should be updated. Also, the configuration instruction interpreter may be configured to receive a header from the EEPROM interface containing a key value from and configured to compare the key value with a pre-defined magic number to determine whether any default value of the default values should be updated. Also, the network device may further include a controller for setting one of the microprocessor interface and the EEPROM interface through which data is received to change the default values.
These and other objects of the present invention will be described in or be apparent from the following description of the preferred embodiments.